from sys import stderr

from django.conf import settings
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.contrib.auth.models import User
from django.http import HttpResponse, HttpResponseForbidden
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ugettext
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse

def pinax_reports_index(request,template_name='pinax_reports/pinax_reports_index.html'):
    
    apps = []
    for application in settings.INSTALLED_APPS:
        module = __import__(application, globals(), locals())
        apps.append(module.__name__)
    
    response = {'apps':apps}
    
    return render_to_response(template_name,response,context_instance=RequestContext(request))
    
    
    